#include <QApplication>
#include <QDesktopWidget>
#include <MainWindow.h>


#define StyleSheet_QComboBox    "background-color: yellow;" \
                                "border-width: 2px solid gray;" \
                                "border-radius: 5px;"

#define StyleSheet_QGroupBox    "background-color: red;" \
                                "border: 1px solid gray;" \
                                "border-radius: 5px;" \
                                "margin-top: 1ex;"

#define StypeSheet_QLabel       "background-color: transparent;" \
                                "border:none"

int main(int argc, char *argv[])
{
    QApplication serialportapp(argc, argv);
    serialportapp.setOrganizationName("deepin");
    serialportapp.setApplicationName("串口调试助手");
    serialportapp.setApplicationVersion("0.1");

    serialportapp.setApplicationDisplayName(QCoreApplication::translate("Main", "SerialAssistant"));

    serialportapp.setStyleSheet("QComboBox { " StyleSheet_QComboBox "}");
    serialportapp.setStyleSheet("QGroupBox { " StyleSheet_QGroupBox "}");
    serialportapp.setStyleSheet("QLabel { " StypeSheet_QLabel "}");

    MainWindow mw;
    mw.show();

    QDesktopWidget *desktop = QApplication::desktop();
    mw.move ((desktop->width() - mw.width())/2,
             (desktop->width() - mw.height())/2);

    return serialportapp.exec();
}
